package com.fwtai;

import com.fwtai.builder.IdHelper;
import com.fwtai.builder.IdWorkerOptions;
import com.fwtai.config.ConfigFile;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * web启动器
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2020-03-24 12:02
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@EnableTransactionManagement
@SpringBootApplication
@EnableAsync
public class LaunchWeb{

  public static void main(final String[] args){
    final IdWorkerOptions options = new IdWorkerOptions(ConfigFile.workerIdWeb);
    options.WorkerIdBitLength = ConfigFile.workerLength;
    options.SeqBitLength = ConfigFile.seqLength;
    IdHelper.setIdGenerator(options);
    SpringApplication.run(LaunchWeb.class,args);
  }
}